package cn.e2win.biz.dbo;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.web.multipart.MultipartFile;

import cn.e2win.base.entity.SysAttach;

@Entity
@Table(name = "cyzj_org")
public class CyzjOrg extends BaseOrg {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
		//编号--结算单
		@Id
		@Basic(optional = false)
		@GeneratedValue(strategy = GenerationType.IDENTITY)
		@Column(name = "id", nullable = false)
		private Integer id;

		private String companyName;//主体
		
		@Transient
		private String labelMain;//主要特点
		
		private Integer workSeatPriceInt;//工位单价
		private Integer workSeatQtyInt;//工位数量
		private Integer freeWorkSeatQtyInt;//剩余工位
		private Integer workAreaInt;//建筑面积
		private Integer freeWorkAreaInt;//剩余面积
		private Integer workAreaPriceInt;//每平米租价
		@Transient
		private String labelOffice;//办公设施
		private String orgDesc;//说明
		private String supportDesc;//政策支持
		private Integer orderInt;//排序字段

		private String logoUrl;//logo
		@Transient
		private MultipartFile logo;
		
		private String mainPicUrl;//主图片
		@Transient
		private MultipartFile mainPic;
		
		@Transient
		private MultipartFile[] picLoopFile;
		@Transient
		private List<SysAttach> picLoopList;
		
		private Integer dsEmpId;//发起人导师
		
		public CyzjOrg(){
			super();
		}


		public Notice getApproveNotice(){
			Notice notice = new Notice(this);
			String msg = "";
			//提交审核时，发消息给adminUserId
			if("SUBMITED".equals(this.getApproveStatus())){
				notice.setToUserId(this.getAdminUserId());
				msg = "创业之家 【" + this.getOrgName() + "】 已提交审核，需要您的审核，请知晓！" ;
			}else if("APPROVED".equals(this.getApproveStatus()) || "REJECTED".equals(this.getApproveStatus())) {
				
				notice.setToUserId(this.getCreateById());
				if("APPROVED".equals(this.getApproveStatus())){
					msg = "创业之家 【" + this.getOrgName() + "】 已被审核通过，请知晓！";  
				}else if("REJECTED".equals(this.getApproveStatus())){
					msg = "创业之家 【" + this.getOrgName() + "】 已被审核驳回，请知晓！";
					
				}
				
			}
			notice.setNoticeType("APPROVE");
			notice.setNoticeDesc(msg);
			notice.setEntityType(this.getClass().getSimpleName());
			notice.setEntityId(this.id);
			return notice;
		}

		public CyzjOrg(Integer id) {
			this.id = id;
		}

		public Integer getId() {
			return id;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		public String getCompanyName() {
			return companyName;
		}

		public void setCompanyName(String companyName) {
			this.companyName = companyName;
		}

		public String getLabelMain() {
			return labelMain;
		}

		public void setLabelMain(String labelMain) {
			this.labelMain = labelMain;
		}


		public Integer getWorkSeatPriceInt() {
			return workSeatPriceInt;
		}


		public void setWorkSeatPriceInt(Integer workSeatPriceInt) {
			this.workSeatPriceInt = workSeatPriceInt;
		}


		public Integer getWorkSeatQtyInt() {
			return workSeatQtyInt;
		}


		public void setWorkSeatQtyInt(Integer workSeatQtyInt) {
			this.workSeatQtyInt = workSeatQtyInt;
		}


		public Integer getFreeWorkSeatQtyInt() {
			return freeWorkSeatQtyInt;
		}


		public void setFreeWorkSeatQtyInt(Integer freeWorkSeatQtyInt) {
			this.freeWorkSeatQtyInt = freeWorkSeatQtyInt;
		}


		public Integer getWorkAreaInt() {
			return workAreaInt;
		}


		public void setWorkAreaInt(Integer workAreaInt) {
			this.workAreaInt = workAreaInt;
		}


		public Integer getFreeWorkAreaInt() {
			return freeWorkAreaInt;
		}


		public void setFreeWorkAreaInt(Integer freeWorkAreaInt) {
			this.freeWorkAreaInt = freeWorkAreaInt;
		}


		public Integer getWorkAreaPriceInt() {
			return workAreaPriceInt;
		}


		public void setWorkAreaPriceInt(Integer workAreaPriceInt) {
			this.workAreaPriceInt = workAreaPriceInt;
		}


		public String getLabelOffice() {
			return labelOffice;
		}

		public void setLabelOffice(String labelOffice) {
			this.labelOffice = labelOffice;
		}

		public String getOrgDesc() {
			return orgDesc;
		}

		public void setOrgDesc(String orgDesc) {
			this.orgDesc = orgDesc;
		}

		public String getSupportDesc() {
			return supportDesc;
		}

		public void setSupportDesc(String supportDesc) {
			this.supportDesc = supportDesc;
		}

		public String getLogoUrl() {
			return logoUrl;
		}

		public void setLogoUrl(String logoUrl) {
			this.logoUrl = logoUrl;
		}

		public MultipartFile getLogo() {
			return logo;
		}

		public void setLogo(MultipartFile logo) {
			this.logo = logo;
		}

		public String getMainPicUrl() {
			return mainPicUrl;
		}

		public void setMainPicUrl(String mainPicUrl) {
			this.mainPicUrl = mainPicUrl;
		}


		public MultipartFile getMainPic() {
			return mainPic;
		}

		public void setMainPic(MultipartFile mainPic) {
			this.mainPic = mainPic;
		}

		public MultipartFile[] getPicLoopFile() {
			return picLoopFile;
		}

		public void setPicLoopFile(MultipartFile[] picLoopFile) {
			this.picLoopFile = picLoopFile;
		}

		public List<SysAttach> getPicLoopList() {
			return picLoopList;
		}

		public void setPicLoopList(List<SysAttach> picLoopList) {
			this.picLoopList = picLoopList;
		}

		public Integer getDsEmpId() {
			return dsEmpId;
		}

		public void setDsEmpId(Integer dsEmpId) {
			this.dsEmpId = dsEmpId;
		}
		public Integer getOrderInt() {
			return orderInt;
		}
		public void setOrderInt(Integer orderInt) {
			this.orderInt = orderInt;
		}
		
}
